<template>
  <div>代码片段生成
免得你跳来跳去，磨磨唧唧
能不能把那个天天打广告的踢了，影响ROG玩家交流体验
今天黑小米，明天黑华为，后天指不定在别的群指着你们鼻子骂呢
  </div>
</template>

<script>
export default {
  data: function() {
    return {}
  },
  methods: {
    add(){
      let arr = [1,2,3]
      let proxy = new Proxy(arr, {	
      get: function (target, key, receiver) {
            console.log('get的key为 ===>' + key);
            return Reflect.get(target, key, receiver);
        },
        set(target, key, value, receiver){
            console.log('set的key为 ===>' + key, value);
            return Reflect.set(target, key, value, receiver);
        }
    })
    proxy[0]          // set的key为 ===>0
    proxy[3] = 12     // set的key为 ===>3  12

    }
  },
  created() {}
}
</script>

<style lang='scss'>
</style>
